//-----------------------------------------------------------------------------
// <copyright file="GeneratedConventionModelClient.cs" company=".NET Foundation">
//      Copyright (c) .NET Foundation and Contributors. All rights reserved. 
//      See License.txt in the project root for license information.
// </copyright>
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.34003
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

// Generation date: 12/19/2013 11:29:46 PM
namespace ModelAliasing
{
    /// <summary>
    /// There are no comments for Customer in the schema.
    /// </summary>
    /// <KeyProperties>
    /// Id
    /// </KeyProperties>
    [global::Microsoft.OData.Client.KeyAttribute("Id")]
    public partial class Customer
    {
        /// <summary>
        /// Create a new Customer object.
        /// </summary>
        /// <param name="financialAddress">Initial value of FinancialAddress.</param>
        /// <param name="ID">Initial value of Id.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public static Customer CreateCustomer(Location.Direction financialAddress, int ID)
        {
            Customer customer = new Customer();
            if ((financialAddress == null))
            {
                throw new global::System.ArgumentNullException("financialAddress");
            }
            customer.FinancialAddress = financialAddress;
            customer.Id = ID;
            return customer;
        }
        /// <summary>
        /// There are no comments for Property FinancialAddress in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public Location.Direction FinancialAddress
        {
            get
            {
                return this._FinancialAddress;
            }
            set
            {
                this.OnFinancialAddressChanging(value);
                this._FinancialAddress = value;
                this.OnFinancialAddressChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private Location.Direction _FinancialAddress;
        partial void OnFinancialAddressChanging(Location.Direction value);
        partial void OnFinancialAddressChanged();
        /// <summary>
        /// There are no comments for Property ClientName in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public string ClientName
        {
            get
            {
                return this._ClientName;
            }
            set
            {
                this.OnClientNameChanging(value);
                this._ClientName = value;
                this.OnClientNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private string _ClientName;
        partial void OnClientNameChanging(string value);
        partial void OnClientNameChanged();
        /// <summary>
        /// There are no comments for Property Id in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public int Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this.OnIdChanging(value);
                this._Id = value;
                this.OnIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private int _Id;
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
        /// <summary>
        /// There are no comments for Property DefaultShippingAddress in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public Location.Direction DefaultShippingAddress
        {
            get
            {
                return this._DefaultShippingAddress;
            }
            set
            {
                this.OnDefaultShippingAddressChanging(value);
                this._DefaultShippingAddress = value;
                this.OnDefaultShippingAddressChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private Location.Direction _DefaultShippingAddress;
        partial void OnDefaultShippingAddressChanging(Location.Direction value);
        partial void OnDefaultShippingAddressChanged();
        /// <summary>
        /// There are no comments for Property Purchases in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::System.Collections.ObjectModel.Collection<AliasedNamespace.Order> Purchases
        {
            get
            {
                return this._Purchases;
            }
            set
            {
                this.OnPurchasesChanging(value);
                this._Purchases = value;
                this.OnPurchasesChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::System.Collections.ObjectModel.Collection<AliasedNamespace.Order> _Purchases = new global::System.Collections.ObjectModel.Collection<AliasedNamespace.Order>();
        partial void OnPurchasesChanging(global::System.Collections.ObjectModel.Collection<AliasedNamespace.Order> value);
        partial void OnPurchasesChanged();
    }
}
namespace Location
{
    /// <summary>
    /// There are no comments for Direction in the schema.
    /// </summary>
    public partial class Direction
    {
        /// <summary>
        /// Create a new Direction object.
        /// </summary>
        /// <param name="reign">Initial value of Reign.</param>
        /// <param name="zipCode">Initial value of ZipCode.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public static Direction CreateDirection(Location.PoliticalRegion reign, int zipCode)
        {
            Direction direction = new Direction();
            if ((reign == null))
            {
                throw new global::System.ArgumentNullException("reign");
            }
            direction.Reign = reign;
            direction.ZipCode = zipCode;
            return direction;
        }
        /// <summary>
        /// There are no comments for Property Reign in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public Location.PoliticalRegion Reign
        {
            get
            {
                return this._Reign;
            }
            set
            {
                this.OnReignChanging(value);
                this._Reign = value;
                this.OnReignChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private Location.PoliticalRegion _Reign;
        partial void OnReignChanging(Location.PoliticalRegion value);
        partial void OnReignChanged();
        /// <summary>
        /// There are no comments for Property FirstLine in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public string FirstLine
        {
            get
            {
                return this._FirstLine;
            }
            set
            {
                this.OnFirstLineChanging(value);
                this._FirstLine = value;
                this.OnFirstLineChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private string _FirstLine;
        partial void OnFirstLineChanging(string value);
        partial void OnFirstLineChanged();
        /// <summary>
        /// There are no comments for Property SecondLine in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public string SecondLine
        {
            get
            {
                return this._SecondLine;
            }
            set
            {
                this.OnSecondLineChanging(value);
                this._SecondLine = value;
                this.OnSecondLineChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private string _SecondLine;
        partial void OnSecondLineChanging(string value);
        partial void OnSecondLineChanged();
        /// <summary>
        /// There are no comments for Property ZipCode in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public int ZipCode
        {
            get
            {
                return this._ZipCode;
            }
            set
            {
                this.OnZipCodeChanging(value);
                this._ZipCode = value;
                this.OnZipCodeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private int _ZipCode;
        partial void OnZipCodeChanging(int value);
        partial void OnZipCodeChanged();
        /// <summary>
        /// There are no comments for Property City in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public string City
        {
            get
            {
                return this._City;
            }
            set
            {
                this.OnCityChanging(value);
                this._City = value;
                this.OnCityChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private string _City;
        partial void OnCityChanging(string value);
        partial void OnCityChanged();
    }
    /// <summary>
    /// There are no comments for PoliticalRegion in the schema.
    /// </summary>
    public partial class PoliticalRegion
    {
        /// <summary>
        /// There are no comments for Property CountryOrRegion in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public string CountryOrRegion
        {
            get
            {
                return this._countryOrRegion;
            }
            set
            {
                this.OnCountryChanging(value);
                this._countryOrRegion = value;
                this.OnCountryChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private string _countryOrRegion;
        partial void OnCountryChanging(string value);
        partial void OnCountryChanged();
        /// <summary>
        /// There are no comments for Property State in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public string State
        {
            get
            {
                return this._State;
            }
            set
            {
                this.OnStateChanging(value);
                this._State = value;
                this.OnStateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private string _State;
        partial void OnStateChanging(string value);
        partial void OnStateChanged();
    }
}
namespace AliasedNamespace
{
    /// <summary>
    /// There are no comments for Order in the schema.
    /// </summary>
    /// <KeyProperties>
    /// Id
    /// </KeyProperties>
    [global::Microsoft.OData.Client.KeyAttribute("Id")]
    public partial class Order
    {
        /// <summary>
        /// Create a new Order object.
        /// </summary>
        /// <param name="ID">Initial value of Id.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public static Order CreateOrder(int ID)
        {
            Order order = new Order();
            order.Id = ID;
            return order;
        }
        /// <summary>
        /// There are no comments for Property Id in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public int Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this.OnIdChanging(value);
                this._Id = value;
                this.OnIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private int _Id;
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
        /// <summary>
        /// There are no comments for Property PurchaseDate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::System.Nullable<global::System.DateTimeOffset> PurchaseDate
        {
            get
            {
                return this._PurchaseDate;
            }
            set
            {
                this.OnPurchaseDateChanging(value);
                this._PurchaseDate = value;
                this.OnPurchaseDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::System.Nullable<global::System.DateTimeOffset> _PurchaseDate;
        partial void OnPurchaseDateChanging(global::System.Nullable<global::System.DateTimeOffset> value);
        partial void OnPurchaseDateChanged();
        /// <summary>
        /// There are no comments for Property ShippingAddress in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public Location.Direction ShippingAddress
        {
            get
            {
                return this._ShippingAddress;
            }
            set
            {
                this.OnShippingAddressChanging(value);
                this._ShippingAddress = value;
                this.OnShippingAddressChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private Location.Direction _ShippingAddress;
        partial void OnShippingAddressChanging(Location.Direction value);
        partial void OnShippingAddressChanged();
        /// <summary>
        /// There are no comments for Property Details in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::System.Collections.ObjectModel.Collection<Billing.OrderLine> Details
        {
            get
            {
                return this._Details;
            }
            set
            {
                this.OnDetailsChanging(value);
                this._Details = value;
                this.OnDetailsChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::System.Collections.ObjectModel.Collection<Billing.OrderLine> _Details = new global::System.Collections.ObjectModel.Collection<Billing.OrderLine>();
        partial void OnDetailsChanging(global::System.Collections.ObjectModel.Collection<Billing.OrderLine> value);
        partial void OnDetailsChanged();
    }
}
namespace Purchasing
{
    /// <summary>
    /// There are no comments for ExpressOrder in the schema.
    /// </summary>
    /// <KeyProperties>
    /// Id
    /// </KeyProperties>
    [global::Microsoft.OData.Client.KeyAttribute("Id")]
    public partial class ExpressOrder : AliasedNamespace.Order
    {
        /// <summary>
        /// Create a new ExpressOrder object.
        /// </summary>
        /// <param name="ID">Initial value of Id.</param>
        /// <param name="fee">Initial value of Fee.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public static ExpressOrder CreateExpressOrder(int ID, double fee)
        {
            ExpressOrder expressOrder = new ExpressOrder();
            expressOrder.Id = ID;
            expressOrder.Fee = fee;
            return expressOrder;
        }
        /// <summary>
        /// There are no comments for Property Fee in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public double Fee
        {
            get
            {
                return this._Fee;
            }
            set
            {
                this.OnFeeChanging(value);
                this._Fee = value;
                this.OnFeeChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private double _Fee;
        partial void OnFeeChanging(double value);
        partial void OnFeeChanged();
        /// <summary>
        /// There are no comments for Property DeliveryDate in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::System.Nullable<global::System.DateTimeOffset> DeliveryDate
        {
            get
            {
                return this._DeliveryDate;
            }
            set
            {
                this.OnDeliveryDateChanging(value);
                this._DeliveryDate = value;
                this.OnDeliveryDateChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::System.Nullable<global::System.DateTimeOffset> _DeliveryDate;
        partial void OnDeliveryDateChanging(global::System.Nullable<global::System.DateTimeOffset> value);
        partial void OnDeliveryDateChanged();
    }
    /// <summary>
    /// There are no comments for FreeDeliveryOrder in the schema.
    /// </summary>
    /// <KeyProperties>
    /// Id
    /// </KeyProperties>
    [global::Microsoft.OData.Client.KeyAttribute("Id")]
    public partial class FreeDeliveryOrder : AliasedNamespace.Order
    {
        /// <summary>
        /// Create a new FreeDeliveryOrder object.
        /// </summary>
        /// <param name="ID">Initial value of Id.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public static FreeDeliveryOrder CreateFreeDeliveryOrder(int ID)
        {
            FreeDeliveryOrder freeDeliveryOrder = new FreeDeliveryOrder();
            freeDeliveryOrder.Id = ID;
            return freeDeliveryOrder;
        }
    }
    /// <summary>
    /// There are no comments for Product in the schema.
    /// </summary>
    /// <KeyProperties>
    /// Id
    /// </KeyProperties>
    [global::Microsoft.OData.Client.KeyAttribute("Id")]
    public partial class Product
    {
        /// <summary>
        /// Create a new Product object.
        /// </summary>
        /// <param name="ID">Initial value of Id.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public static Product CreateProduct(int ID)
        {
            Product product = new Product();
            product.Id = ID;
            return product;
        }
        /// <summary>
        /// There are no comments for Property Id in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public int Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this.OnIdChanging(value);
                this._Id = value;
                this.OnIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private int _Id;
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
        /// <summary>
        /// There are no comments for Property ProductName in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public string ProductName
        {
            get
            {
                return this._ProductName;
            }
            set
            {
                this.OnProductNameChanging(value);
                this._ProductName = value;
                this.OnProductNameChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private string _ProductName;
        partial void OnProductNameChanging(string value);
        partial void OnProductNameChanged();
        /// <summary>
        /// There are no comments for Property AvailableRegions in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::System.Collections.ObjectModel.Collection<Location.PoliticalRegion> AvailableRegions
        {
            get
            {
                return this._AvailableRegions;
            }
            set
            {
                this.OnAvailableRegionsChanging(value);
                this._AvailableRegions = value;
                this.OnAvailableRegionsChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::System.Collections.ObjectModel.Collection<Location.PoliticalRegion> _AvailableRegions = new global::System.Collections.ObjectModel.Collection<Location.PoliticalRegion>();
        partial void OnAvailableRegionsChanging(global::System.Collections.ObjectModel.Collection<Location.PoliticalRegion> value);
        partial void OnAvailableRegionsChanged();
    }
}
namespace Billing
{
    /// <summary>
    /// There are no comments for OrderLine in the schema.
    /// </summary>
    /// <KeyProperties>
    /// Id
    /// </KeyProperties>
    [global::Microsoft.OData.Client.KeyAttribute("Id")]
    public partial class OrderLine
    {
        /// <summary>
        /// Create a new OrderLine object.
        /// </summary>
        /// <param name="cost">Initial value of Cost.</param>
        /// <param name="ID">Initial value of Id.</param>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public static OrderLine CreateOrderLine(double cost, int ID)
        {
            OrderLine orderLine = new OrderLine();
            orderLine.Cost = cost;
            orderLine.Id = ID;
            return orderLine;
        }
        /// <summary>
        /// There are no comments for Property Cost in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public double Cost
        {
            get
            {
                return this._Cost;
            }
            set
            {
                this.OnCostChanging(value);
                this._Cost = value;
                this.OnCostChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private double _Cost;
        partial void OnCostChanging(double value);
        partial void OnCostChanged();
        /// <summary>
        /// There are no comments for Property Id in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public int Id
        {
            get
            {
                return this._Id;
            }
            set
            {
                this.OnIdChanging(value);
                this._Id = value;
                this.OnIdChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private int _Id;
        partial void OnIdChanging(int value);
        partial void OnIdChanged();
        /// <summary>
        /// There are no comments for Property Ammount in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::System.Nullable<int> Ammount
        {
            get
            {
                return this._Ammount;
            }
            set
            {
                this.OnAmmountChanging(value);
                this._Ammount = value;
                this.OnAmmountChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::System.Nullable<int> _Ammount;
        partial void OnAmmountChanging(global::System.Nullable<int> value);
        partial void OnAmmountChanged();
        /// <summary>
        /// There are no comments for Property Product in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public Purchasing.Product Product
        {
            get
            {
                return this._Product;
            }
            set
            {
                this.OnProductChanging(value);
                this._Product = value;
                this.OnProductChanged();
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private Purchasing.Product _Product;
        partial void OnProductChanging(Purchasing.Product value);
        partial void OnProductChanged();
    }
}
namespace Default
{
    /// <summary>
    /// There are no comments for Container in the schema.
    /// </summary>
    public partial class Container : global::Microsoft.OData.Client.DataServiceContext
    {
        /// <summary>
        /// Initialize a new Container object.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public Container(global::System.Uri serviceRoot) :
            base(serviceRoot, global::Microsoft.OData.Client.ODataProtocolVersion.V4)
        {
            this.ResolveName = new global::System.Func<global::System.Type, string>(this.ResolveNameFromType);
            this.OnContextCreated();
            this.Format.LoadServiceModel = GeneratedEdmModel.GetInstance;
            this.Format.UseJson();
        }
        partial void OnContextCreated();
        /// <summary>
        /// Since the namespace configured for this service reference
        /// in Visual Studio is different from the one indicated in the
        /// server schema, use type-mappers to map between the two.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        protected string ResolveNameFromType(global::System.Type clientType)
        {
            return clientType.FullName;
        }
        /// <summary>
        /// There are no comments for ModelAliasingCustomers in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::Microsoft.OData.Client.DataServiceQuery<ModelAliasing.Customer> ModelAliasingCustomers
        {
            get
            {
                if ((this._ModelAliasingCustomers == null))
                {
                    this._ModelAliasingCustomers = base.CreateQuery<ModelAliasing.Customer>("ModelAliasingCustomers");
                }
                return this._ModelAliasingCustomers;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::Microsoft.OData.Client.DataServiceQuery<ModelAliasing.Customer> _ModelAliasingCustomers;
        /// <summary>
        /// There are no comments for Orders in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::Microsoft.OData.Client.DataServiceQuery<AliasedNamespace.Order> Orders
        {
            get
            {
                if ((this._Orders == null))
                {
                    this._Orders = base.CreateQuery<AliasedNamespace.Order>("Orders");
                }
                return this._Orders;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::Microsoft.OData.Client.DataServiceQuery<AliasedNamespace.Order> _Orders;
        /// <summary>
        /// There are no comments for Products in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::Microsoft.OData.Client.DataServiceQuery<Purchasing.Product> Products
        {
            get
            {
                if ((this._Products == null))
                {
                    this._Products = base.CreateQuery<Purchasing.Product>("Products");
                }
                return this._Products;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::Microsoft.OData.Client.DataServiceQuery<Purchasing.Product> _Products;
        /// <summary>
        /// There are no comments for OrdersLines in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public global::Microsoft.OData.Client.DataServiceQuery<Billing.OrderLine> OrdersLines
        {
            get
            {
                if ((this._OrdersLines == null))
                {
                    this._OrdersLines = base.CreateQuery<Billing.OrderLine>("OrdersLines");
                }
                return this._OrdersLines;
            }
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private global::Microsoft.OData.Client.DataServiceQuery<Billing.OrderLine> _OrdersLines;
        /// <summary>
        /// There are no comments for ModelAliasingCustomers in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public void AddToModelAliasingCustomers(ModelAliasing.Customer customer)
        {
            base.AddObject("ModelAliasingCustomers", customer);
        }
        /// <summary>
        /// There are no comments for Orders in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public void AddToOrders(AliasedNamespace.Order order)
        {
            base.AddObject("Orders", order);
        }
        /// <summary>
        /// There are no comments for Products in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public void AddToProducts(Purchasing.Product product)
        {
            base.AddObject("Products", product);
        }
        /// <summary>
        /// There are no comments for OrdersLines in the schema.
        /// </summary>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        public void AddToOrdersLines(Billing.OrderLine orderLine)
        {
            base.AddObject("OrdersLines", orderLine);
        }
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
        private abstract class GeneratedEdmModel
        {
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
            private static global::Microsoft.OData.Edm.IEdmModel ParsedModel = LoadModelFromString();
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
            private const string Edmx = @"<edmx:Edmx Version=""4.0"" xmlns:edmx=""http://docs.oasis-open.org/odata/ns/edmx"">
  <edmx:DataServices m:DataServiceVersion=""4.0"" m:MaxDataServiceVersion=""4.0"" xmlns:m=""http://docs.oasis-open.org/odata/ns/metadata"">
    <Schema Namespace=""ModelAliasing"" xmlns=""http://docs.oasis-open.org/odata/ns/edm"">
      <EntityType Name=""Customer"">
        <Key>
          <PropertyRef Name=""Id"" />
        </Key>
        <Property Name=""FinancialAddress"" Type=""Location.Direction"" Nullable=""false"" />
        <Property Name=""ClientName"" Type=""Edm.String"" />
        <Property Name=""Id"" Type=""Edm.Int32"" Nullable=""false"" />
        <Property Name=""DefaultShippingAddress"" Type=""Location.Direction"" />
        <NavigationProperty Name=""Purchases"" Type=""Collection(AliasedNamespace.Order)"" />
      </EntityType>
    </Schema>
    <Schema Namespace=""Location"" xmlns=""http://docs.oasis-open.org/odata/ns/edm"">
      <ComplexType Name=""Direction"">
        <Property Name=""Reign"" Type=""Location.PoliticalRegion"" Nullable=""false"" />
        <Property Name=""FirstLine"" Type=""Edm.String"" />
        <Property Name=""SecondLine"" Type=""Edm.String"" />
        <Property Name=""ZipCode"" Type=""Edm.Int32"" Nullable=""false"" />
        <Property Name=""City"" Type=""Edm.String"" />
      </ComplexType>
      <ComplexType Name=""PoliticalRegion"">
        <Property Name=""CountryOrRegion"" Type=""Edm.String"" />
        <Property Name=""State"" Type=""Edm.String"" />
      </ComplexType>
    </Schema>
    <Schema Namespace=""AliasedNamespace"" xmlns=""http://docs.oasis-open.org/odata/ns/edm"">
      <EntityType Name=""Order"">
        <Key>
          <PropertyRef Name=""Id"" />
        </Key>
        <Property Name=""Id"" Type=""Edm.Int32"" Nullable=""false"" />
        <Property Name=""PurchaseDate"" Type=""Edm.DateTimeOffset"" />
        <Property Name=""ShippingAddress"" Type=""Location.Direction"" />
        <NavigationProperty Name=""Details"" Type=""Collection(Billing.OrderLine)"" />
      </EntityType>
    </Schema>
    <Schema Namespace=""Purchasing"" xmlns=""http://docs.oasis-open.org/odata/ns/edm"">
      <EntityType Name=""ExpressOrder"" BaseType=""AliasedNamespace.Order"">
        <Property Name=""Fee"" Type=""Edm.Double"" Nullable=""false"" />
        <Property Name=""DeliveryDate"" Type=""Edm.DateTimeOffset"" />
      </EntityType>
      <EntityType Name=""FreeDeliveryOrder"" BaseType=""AliasedNamespace.Order"" />
      <EntityType Name=""Product"">
        <Key>
          <PropertyRef Name=""Id"" />
        </Key>
        <Property Name=""Id"" Type=""Edm.Int32"" Nullable=""false"" />
        <Property Name=""ProductName"" Type=""Edm.String"" />
        <Property Name=""AvailableRegions"" Type=""Collection(Location.PoliticalRegion)"" Nullable=""false"" />
      </EntityType>
    </Schema>
    <Schema Namespace=""Billing"" xmlns=""http://docs.oasis-open.org/odata/ns/edm"">
      <EntityType Name=""OrderLine"">
        <Key>
          <PropertyRef Name=""Id"" />
        </Key>
        <Property Name=""Cost"" Type=""Edm.Double"" Nullable=""false"" />
        <Property Name=""Id"" Type=""Edm.Int32"" Nullable=""false"" />
        <Property Name=""Ammount"" Type=""Edm.Int32"" />
        <NavigationProperty Name=""Product"" Type=""Purchasing.Product"" />
      </EntityType>
    </Schema>
    <Schema Namespace=""Default"" xmlns=""http://docs.oasis-open.org/odata/ns/edm"">
      <EntityContainer Name=""Container"" m:IsDefaultEntityContainer=""true"">
        <EntitySet Name=""ModelAliasingCustomers"" EntityType=""ModelAliasing.Customer"">
          <NavigationPropertyBinding Path=""Purchases"" Target=""Orders"" />
        </EntitySet>
        <EntitySet Name=""Orders"" EntityType=""AliasedNamespace.Order"">
          <NavigationPropertyBinding Path=""Details"" Target=""OrdersLines"" />
        </EntitySet>
        <EntitySet Name=""Products"" EntityType=""Purchasing.Product"" />
        <EntitySet Name=""OrdersLines"" EntityType=""Billing.OrderLine"">
          <NavigationPropertyBinding Path=""Product"" Target=""Products"" />
        </EntitySet>
      </EntityContainer>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>";
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
            public static global::Microsoft.OData.Edm.IEdmModel GetInstance()
            {
                return ParsedModel;
            }
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
            private static global::Microsoft.OData.Edm.IEdmModel LoadModelFromString()
            {
                global::System.Xml.XmlReader reader = CreateXmlReader(Edmx);
                try
                {
                    return global::Microsoft.OData.Edm.Csdl.CsdlReader.Parse(reader);
                }
                finally
                {
                    ((global::System.IDisposable)(reader)).Dispose();
                }
            }
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Service.Design.T4", "1.0.0")]
            private static global::System.Xml.XmlReader CreateXmlReader(string edmxToParse)
            {
                return global::System.Xml.XmlReader.Create(new global::System.IO.StringReader(edmxToParse));
            }
        }
    }
}
